package com.allesblinkt.mucom.common;

import java.util.Vector;

import com.thoughtworks.xstream.annotations.XStreamAlias;

@XStreamAlias("request")
public class ClientRequest {
	
	private ClientItem client;
	
	private Vector<ContentItem> takenItems;
	
	private Enum<RequestType> type;
		
	@XStreamAlias("request_type")
	public enum RequestType {
		/**
		 * The client is running on the screen
		 */
		RUNNING, 
		
		/**
		 * The client hands over control to another screen
		 */
		HANDOVER, 
		
		/**
		 * The client is idle
		 */
		IDLE,
		
		/**
		 * The client wants to upload a file 
		 */
		UPLOAD
		
		
	}
	
	public ClientRequest(ClientItem theClient){
		client = theClient;
		takenItems = new Vector<ContentItem>();
	}

	/**
	 * @return the client
	 */
	public ClientItem getClient() {
		return client;
	}

	/**
	 * @param client the client to set
	 */
	public void setClient(ClientItem client) {
		this.client = client;
	}

	/**
	 * @return the type
	 */
	public Enum<RequestType> getType() {
		return type;
	}

	/**
	 * @param type the type to set
	 */
	public void setType(Enum<RequestType> type) {
		this.type = type;
	}

	/**
	 * @return the takenItems
	 */
	public Vector<ContentItem> getTakenItems() {
		return takenItems;
	}

	/**
	 * 
	 * @param takeQueue
	 */
	public void addTakenItems(Vector<ContentItem> theItems) {
		takenItems.addAll(theItems);
	}
}
